package com.hntest.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class Bid extends BaseAuditDomain implements Serializable {

    private static final long serialVersionUID = -7130332747314009386L;
    private int bidid;//投标id
    private BigDecimal actualrate = BidConst.ZERO; //年利率
    private BigDecimal availableAmount = BidConst.ZERO; //至少投资限额
    private BigDecimal bidmoney =  BidConst.ZERO;//投了多少r
    private long bidrequest_id;//来自于哪个借款标
    private Logininfo biduser_id;//投标人id
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date bidtime;//投标时间
    private String bidrequesttitle;//标的title
    private BidRequest bidRequest;//一对多  为了附件一个 【还款方式】
    private Logininfo logininfo;//association

    public Bid (){}

    public Bid(int bidid, BigDecimal actualrate, BigDecimal availableAmount, BigDecimal bidmoney, long bidrequest_id, Logininfo biduser_id, Date bidtime, String bidrequesttitle, BidRequest bidRequest, Logininfo logininfo) {
        this.bidid = bidid;
        this.actualrate = actualrate;
        this.availableAmount = availableAmount;
        this.bidmoney = bidmoney;
        this.bidrequest_id = bidrequest_id;
        this.biduser_id = biduser_id;
        this.bidtime = bidtime;
        this.bidrequesttitle = bidrequesttitle;
        this.bidRequest = bidRequest;
        this.logininfo = logininfo;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public int getBidid() {
        return bidid;
    }

    public void setBidid(int bidid) {
        this.bidid = bidid;
    }

    public BigDecimal getActualrate() {
        return actualrate;
    }

    public void setActualrate(BigDecimal actualrate) {
        this.actualrate = actualrate;
    }

    public BigDecimal getAvailableAmount() {
        return availableAmount;
    }

    public void setAvailableAmount(BigDecimal availableAmount) {
        this.availableAmount = availableAmount;
    }

    public BigDecimal getBidmoney() {
        return bidmoney;
    }

    public void setBidmoney(BigDecimal bidmoney) {
        this.bidmoney = bidmoney;
    }

    public long getBidrequest_id() {
        return bidrequest_id;
    }

    public void setBidrequest_id(long bidrequest_id) {
        this.bidrequest_id = bidrequest_id;
    }

    public Logininfo getBiduser_id() {
        return biduser_id;
    }

    public void setBiduser_id(Logininfo biduser_id) {
        this.biduser_id = biduser_id;
    }

    public Date getBidtime() {
        return bidtime;
    }

    public void setBidtime(Date bidtime) {
        this.bidtime = bidtime;
    }

    public String getBidrequesttitle() {
        return bidrequesttitle;
    }

    public void setBidrequesttitle(String bidrequesttitle) {
        this.bidrequesttitle = bidrequesttitle;
    }

    public BidRequest getBidRequest() {
        return bidRequest;
    }

    public void setBidRequest(BidRequest bidRequest) {
        this.bidRequest = bidRequest;
    }

    public Logininfo getLogininfo() {
        return logininfo;
    }

    public void setLogininfo(Logininfo logininfo) {
        this.logininfo = logininfo;
    }
}
